<?php
load_lang_file('users');
$this->config->load('users');
$roles_array = $this->config->item('roles_array');
?>
<link type="text/css" href="<?php echo base_url(); ?>layout/admin/css/create_user.css" rel="stylesheet" />
    <div class="signupBox">
        <h1><?php echo $this->lang->line('create_user_page_header'); ?></h1>
        <?php
        if (!empty($error_msg))
            echo "<div class='message error'>" . $error_msg . "</div>";
        if (!empty($success_msg))
            echo "<div class='message success'>" . $success_msg . "</div>";
        ?>
        <fieldset>
            <legend><?php echo $this->lang->line('create_user_login_info'); ?></legend>
            <?php
            echo form_open(site_url('admin/users/create_user'));
            echo '<div class="row">' . $this->lang->line('create_user_username') . "</div>" . form_input('username', $this->input->post('username'));
            echo '<div class="row">' . $this->lang->line('create_user_email_address') . "</div>" . form_input('email_address', $this->input->post('email_address'));
            echo '<div class="row">' . $this->lang->line('create_user_password') . "</div>" . form_password('password', "");
            echo '<div class="row">' . $this->lang->line('create_user_password_confirm') . "</div>" . form_password('password2', "");
            echo '<div class="row">' . $this->lang->line('create_user_role') . "</div>" . form_dropdown('role', $roles_array, $this->input->post('role'), 'class="dropdown"');
            echo form_submit(array(
                'type' => 'submit',
                'value' => $this->lang->line('create_user_button'),
                'class' => 'button create_user_button'));
            echo form_close();
            ?>
        </fieldset>
    </div>